import {
  getStore,
  removeStore,
  setStore
} from '@/util/store'
import website from '@/const/website'
import { SideBarData } from "./data.js"
const common = {
  state: {
    website: website,
    currentMenu: getStore({
      name: 'currentMenu'
    }) || SideBarData,
  },
  actions: {},
  mutations: {
    SET_CURRENT_MENU: (state, action) => {
      state.currentMenu = action;
      setStore({
        name: 'currentMenu',
        content: state.currentMenu,
        type: 'session'
      });
    },
  }
}
export default common
